package me.huha.listener;

import javax.mail.event.TransportEvent;
import javax.mail.event.TransportListener;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @Title: EmailTransportListener.java
 * @Author: Yepx
 * @mail: yepx2013@gmail.com
 * @CreateTime: 2017年9月29日 上午10:49:08
 * @Todo: 监听邮件发送的返回状态
 */
public class EmailTransportListener implements TransportListener {
	
	private Logger logger = LoggerFactory.getLogger(getClass());

	@Override
	public void messageDelivered(TransportEvent e) {
		// TODO Auto-generated method stub
		logger.debug("邮件发送成功了");
	}

	@Override
	public void messageNotDelivered(TransportEvent e) {
		// TODO Auto-generated method stub
		logger.error("邮件发送失败了");
	}

	@Override
	public void messagePartiallyDelivered(TransportEvent e) {
		// TODO Auto-generated method stub
		logger.debug("邮件部分发送成功了");
	}
	
}
